package com.example.lgseckill.controller;

import com.example.lgseckill.domain.Product;
import com.example.lgseckill.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author:e
 * Date:2021/8/17 10:30 上午
 **/
@RestController
@RequestMapping("/product")
public class ProductController {

    @Autowired
    private IProductService productService;

    @GetMapping()
    public List<Product> getList(){
        return productService.list();
    }

}
